<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>
		
	</title>
	<link rel="stylesheet" href="">
</head>
<body>
<!-- <script src="https://cdn.bootcss.com/vue/2.5.8/vue.js"></script> -->
<script src='http://cdn.jsdelivr.net/vue/1.0.26/vue.js'></script>
<div id="root">
	
</div>
<script>
const demo = new Vue({
	 el:'#root',
	 data: {
	 	text: "before",
	 },
	 template : `<div><span>{{text}}</span></div>`,
	 //对应的template 为 <div><span>{{text}}</span></div>
	 render(h){
		 return h('div', {}, [
		 	h('span', {}, [this.__toString__(this.text)])
		 ])
	 }
})
 setTimeout(function(){
 	demo.text = "after"
 }, 3000)
 demo.$watch('text',()=>console.log('成功了'));
</script>	
</body>
</html>